Skip to content

Conversation

gbmarc1
Copy link

@gbmarc1 gbmarc1 commented Jun 5, 2025

I would like that the generator could produce code with the "model" field as the first parameter only.

Proxies such as open-router (or custom proxies) use the "model" field as a routing parameter. We don't need to read the entire payload for routing, we can readily exit the read when we find the "model" field.

The important thing is that the "model" field should be before the "prompt" or "inputs" as those can be very large.

@gbmarc1 gbmarc1 requested a review from a team as a code owner June 5, 2025 15:50
Copy link
Collaborator

@RobertCraigie RobertCraigie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR but I don't think we'll want to change the order of the keys in each method body, instead this ordering could happen in https://github.com/openai/openai-python/blob/main/src/openai/_base_client.py before we turn the dictionary into json, would you mind updating the PR with that approach?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants